home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / Found / FWArchiv / Include / FWArStrm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-21  |  2.6 KB  |  91 lines  |  [TEXT/MPS ]

  1. #ifndef FWARSTRM_H
  2. #define FWARSTRM_H
  3. //========================================================================================
  4. //
  5. //    File:                FWArStrm.h
  6. //    Release Version:    $ 1.0d1 $
  7. //
  8. //    Creation Date:        3/28/94
  9. //
  10. //    Copyright:    © 1994 by Apple Computer, Inc., all rights reserved.
  11. //
  12. //========================================================================================
  13.  
  14. #ifndef FWSTRMRW_H
  15. #include "FWStrmRW.h"
  16. #endif
  17.  
  18.  
  19. //========================================================================================
  20. // Forward class declarations
  21. //========================================================================================
  22.  
  23. class FW_CObjectRegistry;
  24.  
  25.  
  26. //========================================================================================
  27. //    Class FW_CReadableArchive
  28. //========================================================================================
  29.  
  30. class FW_CReadableArchive : public FW_CReadableStream
  31. {
  32.  
  33. public:
  34.  
  35.     typedef void* (* InputFunction)(FW_CReadableArchive& readableArchive);
  36.  
  37.     FW_CReadableArchive(FW_CSink* sink,
  38.                         FW_CReadableStreamFormatter* formatter = 0,
  39.                         FW_CObjectRegistry* objectRegistry = 0);
  40.  
  41.     ~FW_CReadableArchive();
  42.  
  43.     void* InputObject(InputFunction inputFunction);
  44.         // Reads object data for static and dynamic classes from the readableArchive.
  45.  
  46. protected:
  47.  
  48.     FW_Boolean fArchiveCreatedObjectRegistry;
  49.     FW_CObjectRegistry* fObjectRegistry;
  50.     
  51. private:
  52.     FW_CReadableArchive(const FW_CReadableArchive& readableArchive);
  53.     FW_CReadableArchive& operator=(const FW_CReadableArchive& archive);
  54.         // Copy constructor and assignment operator not valid for this class.
  55. };
  56.  
  57.  
  58. //========================================================================================
  59. //    Class FW_CWritableArchive
  60. //========================================================================================
  61.  
  62. class FW_CWritableArchive : public FW_CWritableStream
  63. {
  64.  
  65. public:
  66.  
  67.     typedef void (* OutputFunction)(FW_CWritableArchive & archive, const void *object);
  68.  
  69.     FW_CWritableArchive(FW_CSink* sink,
  70.                         FW_CWritableStreamFormatter* formatter = 0,
  71.                         FW_CObjectRegistry* objectRegistry = 0);
  72.  
  73.     ~FW_CWritableArchive();
  74.  
  75.     void OutputObject(OutputFunction outputFunction,
  76.                       const void* object);
  77.         // Writes object data for static and dynamic classes to the writableArchive.
  78.  
  79. protected:
  80.  
  81.     FW_Boolean fArchiveCreatedObjectRegistry;
  82.     FW_CObjectRegistry* fObjectRegistry;
  83.  
  84. private:
  85.     FW_CWritableArchive(const FW_CWritableArchive& readableArchive);
  86.     FW_CWritableArchive& operator=(const FW_CWritableArchive& archive);
  87.         // Copy constructor and assignment operator not valid for this class.
  88. };
  89.  
  90. #endif
  91.